<include file="public@header" />
</head>
<style>
    .new-form-control{
        width: 49%;
        height: 34px;
        padding: 6px 12px;
        font-size: 14px;
        line-height: 1.42857143;
        color: #333333;
        background-color: #fff;
        background-image: none;
        /*border: 1px solid #ddd;*/
        border-radius: 4px;
    }
    *{margin: 0;padding: 0;list-style:none;border:none;}

    body {
        font-family: "microsoft yahei" !important;
        background-color: #FDFFE0;
    }
    ul,li{
        list-style: none;
        margin: 0;
        padding: 0;
    }
    li{
        line-height:30px;
        font-size:16px;
        padding:5px 10px;
    }
    li.current{
        background:#CCCCCC;
        color:#0000FF;
        cursor: pointer;
    }
    li:hover{
        background:#CCCCCC;
        color:#0000FF;
        cursor: pointer;
    }
</style>
<body>
<ul class="breadcrumb">
    <li><a href="{:url('admin/index/myTransfer')}">我的转介绍</a></li>
    <li><a href="{:url('admin/index/resource')}">新增</a></li>
    <li style="border-bottom: 1px solid #0a6999"><a href="{:url('admin/index/mySourceList')}">我的资源</a></li>
</ul>
<div class="wrap">
    <table class="table table-hover table-bordered" >
        <thead>
        <tr>
            <th>商机编号</th>
            <th>转介绍人</th>
            <th>转介绍人业态</th>
            <th>状态</th>
        </tr>
        </thead>
        <tbody>
        <foreach name="data" item="vo">
            <tr>
                <td>{$vo.opportunity_number}</td>
                <td>{$vo.transfer_code}--{$vo.transfer_name}</td>
                <td>{$vo.transfer_format}</td>
                <td>
                    <select type="text"  data-msg="{$vo.id}"  class="changeTaskStatus form-control"  name="transfer_format" id="">
                        <option value="待跟进"  <if condition="$vo.status eq '待跟进'">selected<else /></if>>待跟进</option>
                        <option value="跟进中" <if condition="$vo.status eq '跟进中'">selected<else /></if>>跟进中</option>
                        <option value="已签单" <if condition="$vo.status eq '已签单'">selected<else /></if>>已签单</option>
                    </select>
                </td>
            </tr>
        </foreach>
        </tbody>
    </table>
    <div class="pagination">{$data->render()} <li class="page-item"><a class="page-link" href="javascript:void(0)">共{$data->total()}条</a></li></div>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
<script>
    $('.changeTaskStatus').change(function() {
        var status = $(this).val()
        var taskid  =   $(this).attr("data-msg");
        $.ajax({
            url:"{:Url('admin/index/changStatus')}",
            data:{
                status:status,
                id:taskid
            },
            type:'post',
            dataType:'json',
            success:function(xhr){
                location.reload(true)
            }
        });
    })
</script>
</html>